package com.tanhua.sso.service;

import com.tanhua.sso.mapper.LogMapper;
import com.tanhua.sso.pojo.Log;
import com.tanhua.sso.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;


@Service
public class LogService {

    @Autowired
    private LogMapper logMapper;


    public void saveLog(String model,Long userId) {

        Log log = new Log();
        log.setLogTime(new Date(System.currentTimeMillis()));
        log.setUid(userId);
        log.setEquipment(model);
        log.setPlace("北京");
        logMapper.insert(log);
    }

}
